package org.jb.coinche.client.business.model;

import java.util.HashMap;
import java.util.Map;

import org.jb.coinche.client.guistatemachine.AbstractState;

public class RoundTurnFinished extends AbstractState implements GameState {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8405370518706201880L;
	private Round round;
	private Map< Player, Card > playedCard = new HashMap< Player, Card >();
	private Player winner;
	
	/*
	 * (non-Javadoc)
	 * @see org.jb.coinche.client.business.model.GameState#getGame()
	 */
	public Game getGame() {
		return getRound().getGame();
	}
	
	/**
	 * @param round the round to set
	 */
	public void setRound(Round round) {
		this.round = round;
	}
	/**
	 * @return the round
	 */
	public Round getRound() {
		return round;
	}
	/**
	 * @param winner the winner to set
	 */
	public void setWinner(Player winner) {
		this.winner = winner;
	}
	/**
	 * @return the winner
	 */
	public Player getWinner() {
		return winner;
	}
	/**
	 * 
	 * @param p
	 * @param card
	 */
	public void setPlayedCard( Player p, Card card) {
		playedCard.put(p, card);
	}
	
	/**
	 * 
	 * @param p
	 * @return
	 */
	public Card getPlayedCard(Player p) {
		return playedCard.get(p);
	}
	
	
	
}
